package xyz.xmh.pattern.structural.facadepattern;

/**
 * @author Administrator
 * 形状的外观类（类似于接待员）
 */
public class ShapeMaker {

    /**
     * 圆形
     */
    private final Shape circle;

    /**
     * 长方形
     */
    private final Shape rectangle;

    /**
     * 正方形
     */
    private final Shape square;

    public ShapeMaker() {
        // 初始化属性
        circle = new Circle();
        rectangle = new Rectangle();
        square = new Square();
    }

    // 简化各种形状的方法

    public void drawCircle() {
        circle.draw();
    }

    public void drawRectangle() {
        rectangle.draw();
    }

    public void drawSquare() {
        square.draw();
    }
}
